<template name='notification'>
  <div class="ui card brd-rad-non card-notification {{#if opened}}opened{{/if}}">
    <div class="content" style="padding: 0px;">
      {{#unless isOnMobile}}
        <div class="right floated" style="padding:5px;">
          <i class="remove circle icon notificationremove"></i>
        </div>
      {{/unless}}
      {{#if equals tx.type '1'}}
        <a class='notification-link' href="/c/{{tx.sender}}">
          <div class="dsp-flx" style="padding:10px;">
            <img class="ui avatar image" src="{{userPic tx.sender}}">
            <div style="width: 100%;display: inline;margin-left: 5px;">
              <div>
                <span style="color:#ff1a1a!important;" class="user">
                  {{tx.sender}}
                </span>
                voted for you as chain leader
              </div>
              <span class="crd-spa-lab">{{timeAgoReal ts}}</span>
            </div>
          </div>
        </a>
      {{/if}}
      {{#if equals tx.type '7'}}
        <a class='notification-link' href="/c/{{tx.sender}}">
          <div class="dsp-flx" style="padding:10px;">
            <img class="ui avatar image" src="{{userPic tx.sender}}">
            <div style="width: 100%;display: inline;margin-left: 5px;">
              <div>
                <span style="color:#ff1a1a!important;" class="user">
                  {{tx.sender}}
                </span>
                subscribed to your channel
              </div>
              <span class="crd-spa-lab">{{timeAgoReal ts}}</span>
            </div>
          </div>
        </a>
      {{/if}}
      {{#if equals tx.type '4'}}
        {{#if equals tx.data.pa activeUsername}}
          <a class='notification-link' href="/v/{{session 'activeUsername'}}/{{tx.data.pp}}">
            <div style="padding: 10px;">
              <div class="dsp-flx">
                <img class="ui avatar image" src="{{userPic tx.sender}}">
                <div style="width: 100%;display: inline;margin-left: 5px;">
                  <div>
                    <span style="color:#ff1a1a!important;" class="user">
                      {{tx.sender}}
                    </span>
                    commented on your content
                  </div>
                  <div><span class="crd-spa-lab">{{timeAgoReal ts}}</span></div>
                </div>
              </div>
            </div>
          </a>
        {{else}}
          <a class='notification-link' href="/v/{{tx.sender}}/{{tx.data.link}}">
            <div style="padding: 10px;">
              <div class="dsp-flx">
                <img class="ui avatar image" src="{{userPic tx.sender}}">
                <div style="width: 100%;display: inline;margin-left: 5px;">
                  <div>
                    <span style="color:#ff1a1a!important;" class="user">
                      {{tx.sender}}
                    </span>
                    mentioned you
                  </div>
                  <div><span class="crd-spa-lab">{{timeAgoReal ts}}</span></div>
                </div>
              </div>
            </div>
          </a>
        {{/if}}
      {{/if}}
      {{#if equals tx.type '13'}}
        <a class='notification-link' href="/v/{{tx.sender}}/{{tx.data.link}}">
          <div style="padding: 10px;">
            <div class="dsp-flx">
              <img class="ui avatar image" src="{{userPic tx.sender}}">
              <div style="width: 100%;display: inline;margin-left: 5px;">
                <div>
                  <span style="color:#ff1a1a!important;" class="user">
                    {{tx.sender}}
                  </span>
                  mentioned you in a promoted post
                </div>
                <div><span class="crd-spa-lab">{{timeAgoReal ts}}</span></div>
              </div>
            </div>
          </div>
        </a>
      {{/if}}
      {{#if equals tx.type '3'}}
        <a class='notification-link' href="/c/{{tx.sender}}">
          <div style="padding: 10px;">
            <div class="dsp-flx">
              <img class="ui avatar image" src="{{userPic tx.sender}}">
              <div style="width: 100%;display: inline;margin-left: 5px;">
                <div>
                  <span style="color:#ff1a1a!important;" class="user">
                    {{tx.sender}}
                  </span>
                  sent you {{displayMoney tx.data.amount 0 'DTC'}}
                </div>
                <div><span class="crd-spa-lab">{{timeAgoReal ts}}</span></div>
              </div>
            </div>
          </div>
        </a>
      {{/if}}
      {{#if equals tx.type '5'}}
        {{#if equals tx.data.tag ''}}
          <a class='notification-link' href="/v/{{session 'activeUsername'}}/{{tx.data.link}}">
            <div style="padding: 10px;">
              <div class="dsp-flx">
                <img class="ui avatar image" src="{{userPic tx.sender}}">
                <div style="width: 100%;display: inline;margin-left: 5px;">
                  <div>
                    <span style="color:#ff1a1a!important;" class="user">
                      {{tx.sender}}
                    </span>
                    voted on your content
                  </div>
                  <div><span class="crd-spa-lab">{{timeAgoReal ts}}</span></div>
                </div>
              </div>
            </div>
          </a>
        {{else}}
          <a class='notification-link' href="/v/{{session 'activeUsername'}}/{{tx.data.link}}">
            <div style="padding: 10px;">
              <div class="dsp-flx">
                <img class="ui avatar image" src="{{userPic tx.sender}}">
                <div style="width: 100%;display: inline;margin-left: 5px;">
                  <div>
                    <span style="color:#ff1a1a!important;" class="user">
                      {{tx.sender}}
                    </span>
                    {{tx.data.tag}}'d your content
                  </div>
                  <div><span class="crd-spa-lab">{{timeAgoReal ts}}</span></div>
                </div>
              </div>
            </div>
          </a>
        {{/if}}
      {{/if}}
      {{#if equals tx.type '9'}}
        <a class='notification-link' href="/v/{{session 'activeUsername'}}/{{permlink}}">
          <div style="padding: 10px;">
            <div class="dsp-flx">
              <img class="ui avatar image" src="{{userPic account}}">
              <div style="width: 100%;display: inline;margin-left: 5px;">
                <div>
                  <span style="color:#ff1a1a!important;" class="user">
                    {{account}}
                  </span>
                  resteemed your content
                </div>
                <div><span class="crd-spa-lab">{{timeAgoReal ts}}</span></div>
              </div>
            </div>
          </div>
        </a>
      {{/if}}
    </div>
  </div>
</template>